<div class="bjui-pageContent" style="width: 100%;">
	<table class="table table-bordered" id="datagrid-group" data-width="100%" data-toggle="datagrid" data-options="{
        height: '100%',
	    tableWidth:'98%',
        delPK:'id',
        gridTitle : '用户列表',
        showToolbar: true,
        toolbarItem: 'add,del',
        dataUrl: '{{url("admin/group")}}?callback=?',
        dataType: 'jsonp',
        postData:{_token:'{{csrf_token()}}'},
        jsonPrefix: 'obj',
        editMode: {dialog:{width:'800',height:600,title:'编辑用户信息',mask:true}},
        editUrl: '{{url("admin/group/edit")}}?_token={{csrf_token()}}',
        delUrl:'{{url("admin/group/groupDel")}}',
        delType:'GET',
        paging: {pageSize:60},
        showCheckboxcol: true,
        linenumberAll: true,
        afterSave:function(){
        	$('#datagrid-group').datagrid('refresh');
        }
   }">
    	<thead>
	    	<tr>
	            <th data-options="{name:'id',align:'center',width:50}">ID</th>
	            <th data-options="{name:'name',align:'center',width:200}">角色名</th>
	            <th data-options="{name:'created_at',align:'center',type:'date',pattern:'yyyy-MM-dd'}">创建时间</th>
	            <th data-options="{name:'updated_at',align:'center',type:'date',pattern:'yyyy-MM-dd'}">更新时间</th>
	            <th data-options="{align:'center',render:datagrid_tree_operation,width:120}">操作列</th>
	        </tr>
	        
       </thead>
  </table>
</div>

<script>
	function datagrid_tree_operation() {
	    var html = '<button type="button" class="btn-green" data-toggle="edit.datagrid.tr">编辑</button>'
	        + '<button type="button" class="btn-red" data-toggle="del.datagrid.tr">删除</button>'
	    return html
	}
</script>